
		<ol class="breadcrumb">
		  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;{{__('Personal Center')}}</a></li>
		</ol>           
       <hr> 
       
       <div>
       	<a  class="pull-right btn btn-default" href="/users/edit">编辑个人资料</a>
	       	<p>您好，{{$CurrentUser['username']}}。您的用户编号是: {{$CurrentUser['id']}}。</p>
	       	<div>
	       		
	       		{{if $CurrentUser['mobile'] && is_phone_number($CurrentUser['mobile'])}}
		       		<p>手机号已绑定：{{$CurrentUser['mobile']}} <i class="fa fa-check" style="color:#0C8918;"></i></p>
		       	{{else}}
		       		<a href="/users/bindMobile" class="btn btn-default">绑定手机号</a>
		       	{{/if}}
		       	&nbsp;
	       	</div>
	       	<div>
	       		<portlet model="Oauthbind" cache="no" recursive="-1" return="array" return_var="oauths" order="source" info="conditions[user_id]=$current_user_id"></portlet>
<?php 
$oauthgroup = array();
foreach($oauths['datalist'] as $oauth){
	$oauthgroup[$oauth['Oauthbind']['source']][] = $oauth;
}
 if(empty($_REQUEST['state']) && $_SERVER['HTTP_HOST']=='www.135plat.com') $_REQUEST['state']='135plat';
 
?>  		
	<div class="ui-portlet-header">
	      <span class="title">第三方账号登录绑定</span>            
	</div>
	       		<p>
	       		{{if $oauthgroup['qq']}}
		       		{{loop $oauthgroup['qq'] $oauth}}
		       			QQ账号已绑定：<a href="#" class="btn btn-default">{{$oauth['Oauthbind']['oauth_name']}}</a><a href="/users/unoauth/{{$oauth['Oauthbind']['id']}}" title="解绑" onclick="return confirm('是否确认要解除绑定？');" class="showtooltip btn btn-default"><i class="fa fa-remove"></i></a> &nbsp;
		       		{{/loop}}
		       	{{else}}
		       		QQ账号未绑定：<a class="btn btn-primary" onclick="window.open('http://www.135editor.com/oauth/qq/login?state={{$_REQUEST['state']}}','qqlogin','height=500,width=1000,top=120,left='+(window.screen.availWidth/2-500)+',help=no,resizable=no,status=no,scroll=no');" href="javascript:;" >绑定QQ账号</a>
		       	{{/if}}
		       	</p>
		       	
		       	
	       		{{if $oauthgroup['weixinQr'] || $oauthgroup['weixinPb']}}
	       			{{if $oauthgroup['weixinQr']}}
	       			<p>微信网页登录绑定：
		       		{{loop $oauthgroup['weixinQr'] $oauth}}
		       			<a href="#" class="btn btn-default">{{$oauth['Oauthbind']['oauth_name']}}</a><a href="/users/unoauth/{{$oauth['Oauthbind']['id']}}" title="解绑" onclick="return confirm('是否确认要解除绑定？');" class="showtooltip btn btn-default"><i class="fa fa-remove"></i></a>  &nbsp;
		       		{{/loop}}</p>{{/if}}
		       		{{if $oauthgroup['weixinPb']}}
	       			<p>135平台公众号授权绑定：
		       		{{loop $oauthgroup['weixinPb'] $oauth}}
		       			<a href="#" class="btn btn-default">{{$oauth['Oauthbind']['oauth_name']}}</a><a href="/users/unoauth/{{$oauth['Oauthbind']['id']}}" title="解绑" onclick="return confirm('是否确认要解除绑定？');" class="showtooltip btn btn-default"><i class="fa fa-remove"></i></a>  &nbsp;
		       		{{/loop}}</p>{{/if}}
		       	{{else}}
		       		<p>{{if strpos($_SERVER['HTTP_HOST'],'.135editor.com')!==false}}
		       		微信账号未绑定：<a class="btn btn-primary" onclick="window.open('http://www.135editor.com/tools/goplat?referer=http://www.135plat.com/oauth/weixin/qrlogin','weixin_qrlogin','height=600,width=1000,top=120,left='+(window.screen.availWidth/2-500)+',help=no,resizable=no,status=no,scroll=no');" href="javascript:;" >绑定微信账号 </a>
		       		{{else}}
      				微信账号未绑定：<a class="btn btn-primary" onclick="window.open('http://www.135plat.com/oauth/weixin/qrlogin?state={{$_REQUEST['state']}}','weixin_qrlogin','height=600,width=1000,top=120,left='+(window.screen.availWidth/2-500)+',help=no,resizable=no,status=no,scroll=no');" href="javascript:;" >绑定微信账号 </a>
      				{{/if}}</p>
		       	{{/if}}
	       		
	       		
	       		<p>
		       	{{if $oauthgroup['toutiao']}}
		       		{{loop $oauthgroup['toutiao'] $oauth}}
		       			今日头条账号已绑定：<a href="#" class="btn btn-default">{{$oauth['Oauthbind']['oauth_name']}}</a><a href="/users/unoauth/{{$oauth['Oauthbind']['id']}}" title="解绑" onclick="return confirm('是否确认要解除绑定？');" class="showtooltip btn btn-default"><i class="fa fa-remove"></i></a>  &nbsp;
		       		{{/loop}}
		       	{{else}}
		       		今日头条未绑定：<a class="btn btn-primary" onclick="window.open('http://www.135editor.com/oauth/toutiao/login?state={{$_REQUEST['state']}}','toutiaologin','height=500,width=1000,top=120,left='+(window.screen.availWidth/2-500)+',help=no,resizable=no,status=no,scroll=no');" href="javascript:;" >绑定今日头条账号</a>
		       	{{/if}}
		       	</p>
		       	
		       	<p>
		       	{{if $oauthgroup['sina']}}
		       		{{loop $oauthgroup['sina'] $oauth}}
		       			微博账号已绑定：<a href="#" class="btn btn-default">{{$oauth['Oauthbind']['oauth_name']}}</a><a href="/users/unoauth/{{$oauth['Oauthbind']['id']}}" title="解绑" onclick="return confirm('是否确认要解除绑定？');" class="showtooltip btn btn-default"><i class="fa fa-remove"></i></a>  &nbsp;
		       		{{/loop}}
		       	{{else}}
		       		微博未绑定：<a class="btn btn-primary" onclick="window.open('http://www.135editor.com/oauth/sina/login?state={{$_REQUEST['state']}}','sinalogin','height=500,width=1000,top=120,left='+(window.screen.availWidth/2-500)+',help=no,resizable=no,status=no,scroll=no');" href="javascript:;" >绑定微博账号</a>
		       	{{/if}}
		       	</p>
	       			
	<div class="ui-portlet-header">
	      <span class="title">免费领取VIP会员</span>            
	</div>
	       		<p>完成① .绑定手机号、② .绑定微信或者QQ，即可<a href="/tasks/draw_role">领取一个月付费会员</a></p>
	<p><br/></p>       		
	<div class="ui-portlet-header">
	      <span class="title">合作平台</span>            
	</div>
	
	<a target="_blank" title="专业H5制作平台" href="http://www.135editor.com/advertises/click/6" class="btn btn-default"><p><img src="http://oss2.rabbitpre.com/rp/widget/navbar2/logo_d941b33.png?t=123124132"></p><p style="font-size: 18px;">专业H5制作平台</p></a>
	       		
	       </div>
		</div>
